<link rel="stylesheet" href="__STATIC__/style/login.css" media="all">
<style>
    .layui-fluid{
        padding: 0px;
    }
    .logo{width:160px;margin:10px 6px;height:auto;}
    .layadmin-link{color: #319cea!important;}
    .layui-form-checkbox[lay-skin=primary]:hover i {
        border-color: #319cea;
        color: #fff
    }
    .layui-form-checked[lay-skin=primary] i {
        border-color: #df0542;
        background-color: #df0542;
        color: #fff
    }
    .layui-btn {
        height:45px;
        border-radius: 4px;
        background-color: #df0542;
        margin-top:20px;
        color: #fff;
    }
    .layui-input{
        height:45px;
        border-radius: 4px;
    }
    .layui-input:hover{
        border-color: #00a0e8!important;
    }
    .layadmin-user-login-header p {
        color:#3c5e77;
        font-size:18px;
        margin-top:10px;
    }
    /*flex布局*/
    #LAY-user-login{
        padding:0;
        display:flex !important;
        justify-content: space-between;
        align-items: center;
        height:100%;
        background-image: url('/images/login-bg.jpg');
        background-size:cover;
    }

    @media screen and (max-width: 3000px ) {
        .layadmin-user-login-main{
            background: #fff;
            margin-right: 11%;
            /*margin-right: 10%;*/
        }
    }
    @media screen and (max-width: 2000px ) {
        .layadmin-user-login-main{
            background: #fff;
            margin-right: 10%;
            /*margin-right: 10%;*/
        }
    }
    @media screen and (max-width: 1700px ) {
        .layadmin-user-login-main{
            background: #fff;
            margin-right: 9%;
        }
    }



</style>
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
    <div class="layadmin-user-login-main">
        <div class="layadmin-user-login-box layadmin-user-login-header">
<!--            {if(config('title.index_show_type') == 'logo')}-->
<!--            <img src="{:config('title.logo')}" style="width: 140px"/>-->
<!--            {/if}-->
<!--            {if(config('title.index_show_type') == 'name')}-->
<!--            {:config('title.name')}-->
<!--            {/if}-->
<!--            {if(config('title.index_show_type') == 'both')}-->
<!--            <img src="{:config('title.logo')}" style="width: 36px;margin-right: 10px"/><span style="font-size: 20px">{:config('title.name')}</span>-->
<!--            {/if}-->

            <p>欢迎登录管理系统</p>
        </div>
        <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
            <div class="layui-form-item">
                <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
                <input type="text" name="name" id="LAY-user-login-username" lay-verify="required" placeholder="用户名/手机号" class="layui-input">
            </div>
            <div class="layui-form-item">
                <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
                <input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="密码" class="layui-input">
            </div>
            <div class="layui-form-item" style="margin-bottom: 20px;">
                <input type="checkbox" name="remember" lay-skin="primary" title="记住密码" checked value="1">
<!--                <a href="forget.html" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">忘记密码？</a>-->
            </div>
            <div class="layui-form-item">
                <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit">登 录</button>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use('form', function(){
        var form = layui.form;
        form.render();
        form.on('submit(LAY-user-login-submit)', function(data){
            var field = data.field;
            $.post("{:url('admin/site/login')}",field,function (ret) {
                if (ret.code == 0){
                    layer.msg(ret.msg,{time:1000},function () {
                        window.location.href = ret.url;
                    })
                }else{
                    layer.msg(ret.msg,{time:1000})
                }
            });
        });
    });
</script>
